package ans.p1528;

/**
 * #      1528
 * 名称   重新排列字符串
 * 链接   https://leetcode-cn.com/problems/shuffle-string
 * 题解   [291](https://leetcode-cn.com/problems/shuffle-string/solution)
 * 通过率 78.6%
 * 难道   简单
 */

public class Solution {
    public String restoreString(String s, int[] indices) {
        char[] chars = new char[indices.length];
        for (int i = 0; i < indices.length; i++) {
            chars[indices[i]] = s.charAt(i);
        }
        return new String(chars);
    }
}